package cn.xscrum.demo.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cn.xscrum.demo.mapper.StationMapper;
import cn.xscrum.demo.domain.Station;
import cn.xscrum.demo.service.IStationService;
import cn.xscrum.common.core.text.Convert;

/**
 * 轨道Service业务层处理
 * 
 * @author xscrum
 * @date 2020-11-18
 */
@Service
public class StationServiceImpl implements IStationService 
{
    @Autowired
    private StationMapper stationMapper;

    /**
	 * 查询轨道
     * 
     * @param stationId 轨道ID
     * @return 轨道
     */
    @Override
    public Station selectStationById(Long stationId)
    {
        return stationMapper.selectStationById(stationId);
    }

    /**
	 * 查询轨道列表
     * 
     * @param station 轨道
     * @return 轨道
     */
    @Override
    public List<Station> selectStationList(Station station)
    {
        return stationMapper.selectStationList(station);
    }

    /**
	 * 新增轨道
     * 
     * @param station 轨道
     * @return 结果
     */
    @Override
    public int insertStation(Station station)
    {
        return stationMapper.insertStation(station);
    }

    /**
	 * 修改轨道
     * 
     * @param station 轨道
     * @return 结果
     */
    @Override
    public int updateStation(Station station)
    {
        return stationMapper.updateStation(station);
    }

    /**
	 * 删除轨道对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteStationByIds(String ids)
    {
        return stationMapper.deleteStationByIds(Convert.toStrArray(ids));
    }

    /**
	 * 删除轨道信息
     * 
     * @param stationId 轨道ID
     * @return 结果
     */
    @Override
    public int deleteStationById(Long stationId)
    {
        return stationMapper.deleteStationById(stationId);
    }
}
